package com.uppfind.framework.service.simple;


import com.uppfind.framework.bean.po.GenericPo;
import com.uppfind.framework.dao.api.CRUMapper;
import com.uppfind.framework.dao.api.InsertMapper;
import com.uppfind.framework.dao.api.QueryMapper;
import com.uppfind.framework.dao.api.UpdateMapper;

/**
 * Created by xuliugen on 2017/6/29.
 */
public interface CRUService<Po extends GenericPo<Pk>, Pk> extends
        SimpleInsertService<Po, Pk>,
        SimpleQueryService<Po, Pk>,
        SimpleUpdateService<Po, Pk> {

    CRUMapper<Po, Pk> getCRUMapper();

    @Override
    default InsertMapper getInsertMapper() {
        return getCRUMapper();
    }

    @Override
    default QueryMapper<Po, Pk> getQueryMapper() {
        return getCRUMapper();
    }

    @Override
    default UpdateMapper<Po> getUpdateMapper() {
        return getCRUMapper();
    }
}
